package com.ibm.spatiotemp.server.config;

/**
 * Implement POJO Class for Restful server to record available backend query servers
 * @author xuxiaomin
 *
 */
public class PubSubMeta {

	public String topic;
	public String serverip;
	public String port;
	public String ServerID;

	public PubSubMeta(){}

	/**
	 * schema: <code>topic serverip serverport ServerID</code>
	 * @param line a line read from init.conf
	 */
	public PubSubMeta(String line)
	{
		String[] splitted = line.split(" ");
		topic = splitted[0].trim();
		serverip = splitted[1].trim();
		port = splitted[2].trim();
		if(splitted.length>3){
			ServerID = splitted[3].trim();
		}
	}
	
	public String getServerID() {
		return ServerID;
	}

	public void setServerID(String serverID) {
		ServerID = serverID;
	}
	
	public String getTopic() {
		return topic;
	}
	public void setTopic(String topic) {
		this.topic = topic;
	}
	public String getServerip() {
		return serverip;
	}
	public void setServerip(String serverip) {
		this.serverip = serverip;
	}
	public String getPort() {
		return port;
	}
	public void setPort(String port) {
		this.port = port;
	}
	
	
}
